GBML manual / Camera

camera_snap

If currently following, jumps AT ONCE (no easing) to the target’s current clamped position. Follow mode stays active; a no-op if not following or the target no longer exists.

Syntax

camera_snap()

Returns

Nothing.

Description

While following, jumps at once - no easing - to the target's current clamped position, without leaving follow mode. A no-op if the camera is not currently following, or its target no longer exists. This is what a room entry wants: the player's new position should be shown immediately, not eased in from wherever the camera happened to be left in the previous room.

Example

camera_snap();

Immediately shows wherever camera_follow's target already is, skipping the usual multi-frame ease - typically called once, right after a room load places the player.

On the GBA

What a room load wants: the player’s new room-entry position should be shown immediately, not eased in from wherever the camera was left in the old room.

See also: camera_follow